package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * Created by Administrator on 2016/6/17.
 */
public class UserAddFollowAction extends AHttpService<PbBean.PbResUserAddFollow> {
    private String userId;

    public static UserAddFollowAction newInstance(Context context, String userId) {
        return new UserAddFollowAction(context, userId);
    }

    private UserAddFollowAction(Context context, String userId) {
        super(context);
        this.userId = userId;
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqUserAddFollow.Builder builder = PbBean.PbReqUserAddFollow.newBuilder();
        builder.setBaseClientInfo(baseBuilder);
        builder.setUserId(userId);

        return apiService.addFollow(builder.build());
    }
}
